package com.zhigongtech.core.web.enm;

import java.util.EnumSet;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;

@Component
public class NomalExceptionEnumInjector {
	@Autowired
    private MessageSource messageSource;

    @PostConstruct
    public void postConstruct() {
    	for(NomalExceptionEnum nEnum : EnumSet.allOf(NomalExceptionEnum.class)) {
    		nEnum.setMessageSource(messageSource);
    	}
    }
}
